home *** CD-ROM | disk | FTP | other *** search
- **************************** GetMouseInput V1.1 ***************************
-
- (same as V1.01)
-
- * REVISED DOCUMENTATION - 24 Mar 1997 *
-
- Program revision date:01 Jan 1997
-
- ©1996 Tim Jackson
-
-
- What is GetMouseInput?
- ----------------------
- GetMouseInput is a simple program to read the state of the mouse buttons.
- It returns a value corresponding to the button(s) pressed which can be read
- from an AmigaDOS® script.
-
-
- What do I need to run it?
- -------------------------
- Any Amiga with WB2.04+. I think.
-
-
- What files should I have?
- -------------------------
- In this distribution, there should be the following files:
-
- GetMouseInput * The main program
- GetMouseInput.doc * This document file
- GetMouseInput.doc.info
- GetMouseInput.guide * An AmigaGuide version of this file
- GetMouseInput.guide.info
- SampleScript * An example startup-sequence
-
-
- Copyright & Distribution
- ------------------------
- GetMouseInput is FREEWARE. That means you can copy it and freely distribute
- it (including uploading to a BBS/Aminet etc.), as long as:
-
- - You don't charge anything for it (except a nominal charge for disk and
- copying)
- - You include all the files listed above in any distribution.
- - You don't modify any files.
-
- (For inclusion on compilation CDs or magazine coverdisks/cover CDs, contact
- me. Any other queries, contact me. No permission is necessary for
- inclusion on Aminet or Fred Fish CDs.)
-
- The copyright of the program remains with me at all times.
-
-
- Disclaimer
- ----------
- You use this program entirely at your own risk. The author will accept no
- responsibility whatsoever for any loss or damage caused by this program
- including but not limited to loss of or damage to data.
-
-
- Why write GetMouseInput?
- ------------------------
- I wrote GetMouseInput as a quick and easy solution to a problem I had.
- Although some games will install onto a hard drive, some will not run from
- Workbench for various reasons (VGA screen modes, lack of memory etc.).
- Therefore they have to be either loaded from floppy or started from AmigaDOS
- before Workbench is loaded. This is inconvenient, so I decided to write a
- simple menu system as a script file. However, there remained the problem of
- how to start the menu. I decided a good way was to hold down a mouse button
- as the computer booted. So, I wrote GetMouseInput to enable me to do this.
-
-
- OK, what does it do exactly?
- ----------------------------
- When it is started, GetMouseInput will check the state of the mouse buttons
- (for the mouse in port 1, just in case you wondered...) and then store a
- number corresponding to the button(s) pressed in a global environment
- variable called MouseInput.
-
- You can then check the returned number and perform an appropriate action.
- See below for information about how to do this.
-
-
- How do I use it?
- ----------------
- You need to call GetMouseInput from the CLI. It will need to called from
- within a script file if it is to be of any use. You can create a script
- file in any text editor (e.g. Ed).
-
- GetMouseInput will not do anything visible but will put a number in an
- environment variable called MouseInput as follows:
-
- No. Button(s) pressed
- --- -----------------
- 0 None
- 1 Left
- 2 Right
- 3 Left + Right
- 4 Middle
- 5 Left + Middle
- 6 Right+ Middle
- 7 Left + Middle + Right
-
- You can check the number returned by using the AmigaDOS 'If' command, for
- example:
-
- If $MouseInput EQ 1
- ; Left button was pressed
- EndIf
-
- So, as you can see, it is very easy to set up a whole range of functions
- each accessed by pressing a different combination of mouse buttons. You can
- therefore set up your startup-sequence to load different setups of Workbench
- or start menus etc. easily. To help you, I have included an example script
- file which I use as my startup-sequence. This file executes different
- startup files according to whether you press no buttons, the left button or
- the right button. You can of course modify this to include a middle mouse
- button etc.
-
- However, all these examples on how to use GetMouseInput are only
- suggestions; there are many uses for it. You could even set up a loop in a
- script file and recursively call GetMouseInput until a certain mouse button
- combination is pressed, therefore allowing a 'wait for mouse click' function
- from AmigaDOS!
-
- By the way, if you want to do things properly, you can unset the MouseInput
- environment variable after you have finished with it by using:
-
- UnSetEnv MouseInput
-
-
- Future Improvements
- -------------------
- I don't have any ideas for any future improvements to GetMouseInput as it's
- such a simple program. If you have any, I'd be glad to hear from you and
- implement them.
-
-
- Known Bugs
- ----------
- None. But do let me know if GetMouseInput does anything naughty such as
- totally screwing up your system.
-
-
- Version History
- ---------------
- V1.00 Original version. Bit of a naughty bug which tended to cause a
- software failure.
- V1.01 FIRST PUBLIC RELEASE. Bug fixed.
- V1.1 Same as V1.01 but with Style Guide compliant version number :)
-
-
- » Contact me! «
- ---------------
- If you've found GetMouseInput useful, TELL ME ABOUT IT! The program is
- freeware; there is nothing to be paid but I'd like to hear from you anyway.
- Of course, any donations will be gratefully accepted.
-
- In fact, why not send me your opinion of GetMouseInput on a postcard from
- your local area, especially if you live outside the U.K.
-
- Any bug reports or suggestions for improvement should also be sent to the
- below address:
-
- Tim Jackson
- 4 Charnock View Road
- Sheffield
- S12 3HJ
- ENGLAND
-
-
- Or, e-mail me at:
-
- tim_jackson@bigfoot.com
-
- On the occasions that I have access to IRC, my usual nick is Arcline and I
- tend to hang around on IRCnet (try irc.demon.co.uk).
-
-